inherited dtmck_StuffStock: Tdtmck_StuffStock
  OldCreateOrder = True
  Left = 698
  Top = 267
  Height = 414
  Width = 659
  inherited adsMaster: TADODataSet
    CursorType = ctStatic
    CommandText = 'Select * from V_ck_StuffStock where 0=1'
    object adsMasterID: TIntegerField
      Alignment = taLeftJustify
      DisplayLabel = #20027#38190'ID'
      FieldName = 'ID'
    end
    object adsMasterDataType: TStringField
      DisplayLabel = #25968#25454#31867#22411
      FieldName = 'DataType'
    end
    object adsMasterDeptID: TStringField
      DisplayLabel = #20844#21496'ID'
      FieldName = 'DeptID'
    end
    object adsMasterStockID: TStringField
      DisplayLabel = #20179#24211'ID'
      FieldName = 'StockID'
    end
    object adsMasterStockCode: TStringField
      DisplayLabel = #20179#24211#32534#30721
      FieldName = 'StockCode'
    end
    object adsMasterStockName: TStringField
      DisplayLabel = #20179#24211
      FieldName = 'StockName'
    end
    object adsMasterPosID: TStringField
      DisplayLabel = #20179#20301'ID'
      FieldName = 'PosID'
    end
    object adsMasterPosNo: TStringField
      DisplayLabel = #20179#20301#32534#30721
      FieldName = 'PosNo'
    end
    object adsMasterPosName: TStringField
      DisplayLabel = #20179#20301#21517#31216
      FieldName = 'PosName'
    end
    object adsMasterSupplyID: TStringField
      DisplayLabel = #20379#24212#21830'ID'
      FieldName = 'SupplyID'
    end
    object adsMasterSupplyCode: TStringField
      DisplayLabel = #20379#24212#21830#32534#30721
      FieldName = 'SupplyCode'
    end
    object adsMasterSupplyShortName: TStringField
      DisplayLabel = #20379#24212#21830#21517#31216
      FieldName = 'SupplyShortName'
      Size = 50
    end
    object adsMasterSupplyHelperCode: TStringField
      DisplayLabel = #20379#24212#21830#21161#35760#30721
      FieldName = 'SupplyHelperCode'
      Size = 25
    end
    object adsMasterProcessID: TStringField
      DisplayLabel = #31867#22411'ID'
      FieldName = 'ProcessID'
    end
    object adsMasterProcessName: TStringField
      DisplayLabel = #31867#22411
      FieldName = 'ProcessName'
    end
    object adsMasterStuffID: TStringField
      DisplayLabel = #29289#26009'ID'
      FieldName = 'StuffID'
    end
    object adsMasterStuffCode: TStringField
      DisplayLabel = #29289#26009#32534#30721
      FieldName = 'StuffCode'
      Size = 50
    end
    object adsMasterStuffName: TStringField
      DisplayLabel = #29289#26009#21517#31216
      FieldName = 'StuffName'
      Size = 100
    end
    object adsMasterStuffSpecs: TStringField
      DisplayLabel = #22411#21495#35268#26684
      FieldName = 'StuffSpecs'
      Size = 1000
    end
    object adsMasterStuffHelperCode: TStringField
      DisplayLabel = #29289#26009#21161#35760#30721
      FieldName = 'StuffHelperCode'
      Size = 50
    end
    object adsMasterHasStop: TBooleanField
      DisplayLabel = #31105#29992#21542
      FieldName = 'HasStop'
    end
    object adsMasterBatchNo: TStringField
      DisplayLabel = #25209#21495
      FieldName = 'BatchNo'
      Size = 50
    end
    object adsMasterColorName: TStringField
      DisplayLabel = #39068#33394
      FieldName = 'ColorName'
      Size = 50
    end
    object adsMasterProperties: TStringField
      DisplayLabel = #23646#24615
      FieldName = 'Properties'
      Size = 50
    end
    object adsMasterPieceCount: TIntegerField
      DisplayLabel = #23384#36135'|'#20214#25968
      FieldName = 'PieceCount'
    end
    object adsMasterSparePieceNumber: TFloatField
      DisplayLabel = #23384#36135'|'#21097#20313#20214#25968
      FieldName = 'SparePieceNumber'
      ReadOnly = True
    end
    object adsMasterPieceNumber: TFloatField
      DisplayLabel = #23384#36135'|'#27599#20214#25968#37327
      FieldName = 'PieceNumber'
    end
    object adsMasterNumber: TFloatField
      DisplayLabel = #23384#36135'|'#25968#37327
      FieldName = 'Number'
    end
    object adsMasterOccupy: TFloatField
      DisplayLabel = #23384#36135'|'#21344#29992
      FieldName = 'Occupy'
    end
    object adsMasterValidNumber: TFloatField
      DisplayLabel = #23384#36135'|'#21487#29992
      FieldName = 'ValidNumber'
      ReadOnly = True
    end
    object adsMasterUnitID: TStringField
      DisplayLabel = #21333#20301'ID'
      FieldName = 'UnitID'
    end
    object adsMasterUnitName: TStringField
      DisplayLabel = #23384#36135'|'#21333#20301
      FieldName = 'UnitName'
      Size = 10
    end
    object adsMasterAuxNumber: TFloatField
      DisplayLabel = #36741#21161#25968#37327
      FieldName = 'AuxNumber'
    end
    object adsMasterAuxUnitID: TStringField
      DisplayLabel = #36741#21161#21333#20301'ID'
      FieldName = 'AuxUnitID'
    end
    object adsMasterAuxUnitName: TStringField
      DisplayLabel = #36741#21161#21333#20301
      FieldName = 'AuxUnitName'
    end
    object adsMasterConvertRate: TFloatField
      DisplayLabel = #25442#31639#29575
      FieldName = 'ConvertRate'
    end
    object adsMasterPrice: TFloatField
      DisplayLabel = #23384#36135'|'#21333#20215
      FieldName = 'Price'
    end
    object adsMasterMoney: TFloatField
      DisplayLabel = #23384#36135'|'#37329#39069
      FieldName = 'Money'
    end
    object adsMasterSafeStock: TFloatField
      DisplayLabel = #23433#20840#24211#23384
      FieldName = 'SafeStock'
    end
    object adsMasterSubStock: TFloatField
      DisplayLabel = #38656#37319#36141#25968
      FieldName = 'SubStock'
      ReadOnly = True
    end
    object adsMasterStuffType: TStringField
      DisplayLabel = #20998#31867'ID'
      FieldName = 'StuffType'
    end
    object adsMasterStuffTypeName: TStringField
      DisplayLabel = #20998#31867
      FieldName = 'StuffTypeName'
      Size = 50
    end
    object adsMasterRuleChildID: TStringField
      DisplayLabel = #29289#26009#20998#31867#35268#21017'ID'
      FieldName = 'RuleChildID'
      Size = 50
    end
    object adsMasterRemark: TStringField
      DisplayLabel = #25551#36848'/'#22791#27880
      FieldName = 'Remark'
      Size = 50
    end
  end
  inherited adsMasterEdit: TADODataSet
    CursorType = ctStatic
  end
  object adsUserCompany: TADODataSet
    Connection = dtmConnect.conMain
    LockType = ltBatchOptimistic
    CommandText = 
      'select b.DeptID, b.DeptCode, b.DeptName from xt_CompanySet a '#13#10'j' +
      'oin da_Department b on a.CompanyID=b.DeptID'#13#10'where a.UserID=(sel' +
      'ect UserID from xt_Users where UserCode=:UserCode)'
    Parameters = <
      item
        Name = 'UserCode'
        Size = -1
        Value = Null
      end>
    Left = 176
    Top = 104
  end
  object adsUserStock: TADODataSet
    Connection = dtmConnect.conMain
    LockType = ltBatchOptimistic
    CommandText = 
      'select b.StockID, b.StockCode, b.StockName from xt_StockSet a '#13#10 +
      'join da_Stock b on a.StockID=b.StockID'#13#10'where b.DeptID=:DeptID'#13#10 +
      ' and a.UserID=(select UserID from xt_Users where UserCode=:UserC' +
      'ode)'#13#10' and isnull(b.StockType,0)=:StockType and isnull(b.HasStop' +
      ',0)=0'
    Parameters = <
      item
        Name = 'DeptID'
        Size = -1
        Value = Null
      end
      item
        Name = 'UserCode'
        Size = -1
        Value = Null
      end
      item
        Name = 'StockType'
        Size = -1
        Value = Null
      end>
    Left = 296
    Top = 104
  end
  object adsStuffType: TADODataSet
    Connection = dtmConnect.conMain
    CursorType = ctStatic
    CommandText = 
      'select * from V_da_StuffALLType2'#13#10'where ClassID=:ClassID'#13#10' order' +
      ' by RuleChildID'
    Parameters = <
      item
        Name = 'ClassID'
        Attributes = [paNullable]
        DataType = ftString
        NumericScale = 255
        Precision = 255
        Size = 20
        Value = Null
      end>
    Left = 168
    Top = 32
  end
  object adsStuffStockUseList: TADODataSet
    Connection = dtmConnect.conMain
    CursorType = ctStatic
    LockType = ltBatchOptimistic
    AfterOpen = adsMasterAfterOpen
    BeforePost = adsMasterBeforePost
    OnNewRecord = adsMasterNewRecord
    CommandText = 
      'Select * from V_ck_StuffStockUseList where DeptID=:DeptID'#13#10'  and' +
      ' StockID=:StockID and PosID=:PosID and SupplyID=:SupplyID'#13#10'  and' +
      ' ProcessID=:ProcessID and StuffID=:StuffID'#13#10'  and isnull(BatchNo' +
      ','#39#39')=:BatchNo and isnull(ColorName,'#39#39')=:ColorName'#13#10'  and isnull(' +
      'Properties,'#39#39')=:Properties and isnull(Status,0)=0'
    CommandTimeout = 0
    EnableBCD = False
    Parameters = <
      item
        Name = 'DeptID'
        DataType = ftString
        NumericScale = 255
        Precision = 255
        Size = 20
        Value = Null
      end
      item
        Name = 'StockID'
        DataType = ftString
        NumericScale = 255
        Precision = 255
        Size = 20
        Value = Null
      end
      item
        Name = 'PosID'
        Attributes = [paNullable]
        DataType = ftString
        NumericScale = 255
        Precision = 255
        Size = 20
        Value = Null
      end
      item
        Name = 'SupplyID'
        Attributes = [paNullable]
        DataType = ftString
        NumericScale = 255
        Precision = 255
        Size = 20
        Value = Null
      end
      item
        Name = 'ProcessID'
        Attributes = [paNullable]
        DataType = ftString
        NumericScale = 255
        Precision = 255
        Size = 20
        Value = Null
      end
      item
        Name = 'StuffID'
        Attributes = [paNullable]
        DataType = ftString
        NumericScale = 255
        Precision = 255
        Size = 20
        Value = Null
      end
      item
        Name = 'BatchNo'
        DataType = ftString
        NumericScale = 255
        Precision = 255
        Size = 20
        Value = Null
      end
      item
        Name = 'ColorName'
        DataType = ftString
        NumericScale = 255
        Precision = 255
        Size = 20
        Value = Null
      end
      item
        Name = 'Properties'
        DataType = ftString
        NumericScale = 255
        Precision = 255
        Size = 20
        Value = Null
      end>
    Left = 296
    Top = 32
    object IntegerField1: TIntegerField
      DisplayLabel = #20027#38190'ID'
      FieldName = 'ID'
    end
    object adsStuffStockUseListBusyNumber: TFloatField
      DisplayLabel = #39044#30041'|'#25968#37327
      FieldName = 'BusyNumber'
    end
    object adsStuffStockUseListUsedNumber: TFloatField
      DisplayLabel = #39044#30041'|'#24050#29992
      FieldName = 'UsedNumber'
    end
    object FloatField3: TFloatField
      DisplayLabel = #39044#30041'|'#21487#29992
      FieldName = 'ValidNumber'
      ReadOnly = True
    end
    object adsStuffStockUseListSourceBillType: TStringField
      DisplayLabel = #26469#28304#31867#22411'ID'
      FieldName = 'SourceBillType'
    end
    object adsStuffStockUseListSourceBillTypeName: TStringField
      DisplayLabel = #26469#28304#31867#22411
      FieldName = 'SourceBillTypeName'
    end
    object adsStuffStockUseListSourceBillNo: TStringField
      DisplayLabel = #26469#28304#21333#21495
      FieldName = 'SourceBillNo'
    end
    object adsStuffStockUseListStatus: TWordField
      DisplayLabel = #39044#30041#29366#24577
      FieldName = 'Status'
    end
    object adsStuffStockUseListWriter: TStringField
      DisplayLabel = #30003#35831#20154
      FieldName = 'Writer'
    end
    object adsStuffStockUseListWriteTime: TDateTimeField
      DisplayLabel = #30003#35831#26102#38388
      FieldName = 'WriteTime'
    end
    object adsStuffStockUseListModifier: TStringField
      DisplayLabel = #20462#25913#20154
      FieldName = 'Modifier'
    end
    object adsStuffStockUseListModifyTime: TDateTimeField
      DisplayLabel = #20462#25913#26102#38388
      FieldName = 'ModifyTime'
    end
    object adsStuffStockUseListRemark: TStringField
      DisplayLabel = #22791#27880
      FieldName = 'Remark'
      Size = 500
    end
  end
  object adsStockSum: TADODataSet
    Connection = dtmConnect.conMain
    CursorType = ctStatic
    LockType = ltBatchOptimistic
    AfterOpen = adsMasterAfterOpen
    BeforePost = adsMasterBeforePost
    OnNewRecord = adsMasterNewRecord
    CommandText = 'Select * from V_ck_StuffStockSum where 0=1'
    CommandTimeout = 0
    EnableBCD = False
    Parameters = <>
    Left = 464
    Top = 96
    object adsStockSumDataType: TStringField
      DisplayLabel = #25968#25454#31867#22411
      FieldName = 'DataType'
    end
    object StringField1: TStringField
      DisplayLabel = #20844#21496'ID'
      FieldName = 'DeptID'
    end
    object StringField2: TStringField
      DisplayLabel = #20179#24211'ID'
      FieldName = 'StockID'
    end
    object StringField3: TStringField
      DisplayLabel = #20179#24211#32534#30721
      FieldName = 'StockCode'
    end
    object StringField4: TStringField
      DisplayLabel = #20179#24211
      FieldName = 'StockName'
    end
    object StringField12: TStringField
      DisplayLabel = #31867#22411'ID'
      FieldName = 'ProcessID'
    end
    object StringField13: TStringField
      DisplayLabel = #31867#22411
      FieldName = 'ProcessName'
    end
    object StringField14: TStringField
      DisplayLabel = #29289#26009'ID'
      FieldName = 'StuffID'
    end
    object StringField15: TStringField
      DisplayLabel = #29289#26009#32534#30721
      FieldName = 'StuffCode'
      Size = 50
    end
    object StringField16: TStringField
      DisplayLabel = #29289#26009#21517#31216
      FieldName = 'StuffName'
      Size = 50
    end
    object StringField17: TStringField
      DisplayLabel = #22411#21495#35268#26684
      FieldName = 'StuffSpecs'
      Size = 100
    end
    object StringField18: TStringField
      DisplayLabel = #21161#35760#30721
      FieldName = 'StuffHelperCode'
      Size = 50
    end
    object StringField19: TStringField
      DisplayLabel = #25209#21495
      FieldName = 'BatchNo'
      Size = 50
    end
    object StringField20: TStringField
      DisplayLabel = #39068#33394
      FieldName = 'ColorName'
      Size = 50
    end
    object StringField21: TStringField
      DisplayLabel = #23646#24615
      FieldName = 'Properties'
      Size = 50
    end
    object adsStockSumPieceCount: TIntegerField
      DisplayLabel = #20214#25968
      FieldName = 'PieceCount'
      ReadOnly = True
    end
    object adsStockSumSparePieceNumber: TFloatField
      DisplayLabel = #21097#20313#20214#25968
      FieldName = 'SparePieceNumber'
      ReadOnly = True
    end
    object FloatField1: TFloatField
      DisplayLabel = #25968#37327
      FieldName = 'Number'
    end
    object StringField22: TStringField
      DisplayLabel = #21333#20301'ID'
      FieldName = 'UnitID'
    end
    object StringField26: TStringField
      DisplayLabel = #21333#20301
      FieldName = 'UnitName'
      Size = 10
    end
    object adsStockSumAuxNumber: TFloatField
      DisplayLabel = #36741#21161#25968#37327
      FieldName = 'AuxNumber'
      ReadOnly = True
    end
    object adsStockSumAuxUnitID: TStringField
      DisplayLabel = #36741#21161#21333#20301'ID'
      FieldName = 'AuxUnitID'
    end
    object adsStockSumAuxUnitName: TStringField
      DisplayLabel = #36741#21161#21333#20301
      FieldName = 'AuxUnitName'
    end
    object adsStockSumMoney: TFloatField
      DisplayLabel = #37329#39069
      FieldName = 'Money'
      ReadOnly = True
    end
    object adsStockSumStuffType: TStringField
      DisplayLabel = #29289#26009#20998#31867'ID'
      FieldName = 'StuffType'
    end
    object StringField28: TStringField
      DisplayLabel = #29289#26009#20998#31867
      FieldName = 'StuffTypeName'
      Size = 50
    end
    object StringField29: TStringField
      DisplayLabel = #29289#26009#20998#31867#35268#21017'ID'
      FieldName = 'RuleChildID'
      Size = 50
    end
  end
  object aspReCalcStockPrice: TADOStoredProc
    Connection = dtmConnect.conMain
    LockType = ltBatchOptimistic
    ProcedureName = 'ck_sc_StuffReCalcStockPrice;1'
    Parameters = <
      item
        Name = '@RETURN_VALUE'
        DataType = ftInteger
        Direction = pdReturnValue
        Precision = 10
        Value = Null
      end
      item
        Name = '@DataType'
        Attributes = [paNullable]
        DataType = ftString
        Size = 20
        Value = Null
      end
      item
        Name = '@DeptID'
        Attributes = [paNullable]
        DataType = ftString
        Size = 20
        Value = Null
      end
      item
        Name = '@StockID'
        Attributes = [paNullable]
        DataType = ftString
        Size = 20
        Value = Null
      end
      item
        Name = '@BeginTime'
        Attributes = [paNullable]
        DataType = ftDateTime
        Value = Null
      end
      item
        Name = '@EndTime'
        Attributes = [paNullable]
        DataType = ftDateTime
        Value = Null
      end
      item
        Name = '@StuffCode'
        Attributes = [paNullable]
        DataType = ftString
        Size = 50
        Value = Null
      end
      item
        Name = '@SysInfoCompany'
        Attributes = [paNullable]
        DataType = ftString
        Size = 20
        Value = Null
      end
      item
        Name = '@SysInfoUserCode'
        Attributes = [paNullable]
        DataType = ftString
        Size = 20
        Value = Null
      end
      item
        Name = '@ProcFlag'
        Attributes = [paNullable]
        DataType = ftInteger
        Precision = 10
        Value = Null
      end
      item
        Name = '@Msg'
        Attributes = [paNullable]
        DataType = ftString
        Direction = pdInputOutput
        Size = 500
        Value = Null
      end>
    Left = 176
    Top = 168
  end
end
